<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<%@ include file="/WEB-INF/views/shared/master/contentHeader.jsp"%>
<style>
	body{
		font-size:9px ;
		font-family:黑体,微软雅黑;
	}
	.table{
		border:black 1px solid !important;
	}
	.table tr th{
		border:black 1px solid !important;
		text-align: center;
		padding:0px 2px !important;
	}
	.table tr td{	
		border:black 1px solid !important;
		padding:0px 2px !important;
		text-align: center;
	}
</style>
<script type="text/javascript">
	function paceDoneCallback(){
		window.print();
		//top.main.formSubmit();
		top.$("#modal_purchasePrint_form").modal("hide");
	}
</script>
<div id="printContent" >
	
		<div class="text-center"><h5>${shop.shopName }采购订单</h5></div>
	
	    <label  style="font-size:1.2em;margin-left:20px">采购单号 : ${purchase.purchaseNo }</label><label style="font-size:1.2em;margin-left:20px">供应商 :  ${purchase.supplier.supplierName }	</label><label style="font-size:1.2em;margin-left:20px">采购员 : ${purchase.purchaseName }	</label><label style="font-size:1.2em;margin-left:20px">采购日期 : <fmt:formatDate value="${purchase.createDate}" type="date" dateStyle="default" pattern="YY-MM-dd HH:mm"/>	</label>
		<table class="cntable table table-bordered  " >
					<thead>
						<tr class="success" >
							<th style="width:50px">序号</th>
							
							<th style="width:120px">商品编码</th>
							<th style="width:120px">商品名称</th>
							<th style="width:120px">规格</th>
							<th style="width:120px">单位</th>
							<th style="width:120px">采购数</th>
							<th style="width:120px">采购单价(元)</th>
							<th style="width:120px">小计(元)</th>
						</tr>
					</thead>
					<tbody >
					
					<c:forEach var="purchaseCollocation" items="${purchase.purchaseCollocations}" varStatus="status">
						<tr  >
							<td>${status.index+1 }</td>
							<td>${purchaseCollocation.cargo.cargoNo }</td>
							<td>${purchaseCollocation.cargo.cargoName }</td>
							<td>${purchaseCollocation.collocation.propertyNameOne }/${purchaseCollocation.collocation.propertyNameTwo }</td>
							<td>${purchaseCollocation.cargo.unit }</td>
							<td>${purchaseCollocation.purchaseNumber }</td>
							<td>${purchaseCollocation.purchasePrice }</td>
							<td>${purchaseCollocation.purchaseNumber*purchaseCollocation.purchasePrice }</td>
						</tr>			
					</c:forEach>				
					</tbody>
					<tfoot >
						<tr style="height:30px" >
							<th>合计</th>
							<th colspan="4"> </th>
					
							<th>${purchase.purchaseNum }</th>
							<th> </th>
							<th>${purchase.purchaseMoney }</th>
						</tr>
						<tr style="height:30px"  >
							<th  colspan="6" rowspan="2"></th>
							<th >
								<label cssClass="col-sm-4">其他金额:</label>
							</th>
							<th>${purchase.otherMoney }</th>
						</tr>
						<tr style="height:30px"  >			
							<th >
								<label cssClass="col-sm-4">应付金额:</label>
							</th>
							<th style="color:red">${purchase.otherMoney+ purchase.purchaseMoney}</th>
						</tr>
					</tfoot>
				</table>     
				<div class="row" style="margin-top:6px;">
					<div style="float:left;"><span style="padding-left:10px;">其他金额：${purchase.otherMoney }</span></div>
					<div style="float:right;"><span style="padding-right:35px;">应付金额：${purchase.otherMoney+ purchase.purchaseMoney}</span></div>
				</div>
				<div class="row">
					<div style="float:left;"><span style="padding-left:10px;">备注说明：${supplier.supplierPhone}</span></div>
				</div>
				<div class="row" style="margin-top:6px;">
					<div style="float:left;"><span style="padding-left:10px;">采购员：${purchase.purchaseName }</span></div>
					<div style="float:right;"><span style="padding-right:35px;">制单人：${purchase.createUserName }</span></div>
				</div>
</div>
<script type="text/javascript">

</script>
<%request.setAttribute("noScripts","formpickers.location;"); %>
<%@ include file="/WEB-INF/views/shared/base/scripts/jqueryui.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/formvalidations.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/notifications.jsp"%>
<%@ include file="/WEB-INF/views/shared/base/scripts/limitless/default/ui/moment.jsp"%>
<%@ include file="/WEB-INF/views/shared/master/contentFooter.jsp"%>
